<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <ul class="nav">
    <li>我的首页</li>
    <li>产品介绍</li>
    <li>联系方式</li>
  </ul>
  <script>
    const uli = document.querySelectorAll(`ul li`)
    for(let i = 0; i < uli.length; i++){
      console.dir(uli[i])
    }
  </script>
</body>
</html>